package thread;

/**
 * @Description: null
 * @Project: testDemo
 * @Author: hjibo
 * @CreateDate: 2019-01-23 22:56
 * @ModificationHistory:
 */
public class ThreadDemo1 extends Thread {
    private  Integer a = 0;
    @Override
    public void run() {
        Thread.currentThread().setName("ThreadDemo1线程");
        try {
            synchronized(this){
                this.wait();
                a++;
            }
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("这里是线程：" + Thread.currentThread().getName() + "，" + a);
    }
}
